package com.zz.kt.order.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zz.kt.model.order.OrderInfo;
import com.zz.kt.vo.order.OrderFormVo;
import com.zz.kt.vo.order.OrderInfoQueryVo;
import com.zz.kt.vo.order.OrderInfoVo;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 订单表 订单表 服务类
 * </p>
 *
 * @author zz
 * @since 2022-09-05
 */
public interface OrderInfoService extends IService<OrderInfo> {

    //订单列表
    Map<String, Object> selectOrderInfoPage(Page<OrderInfo> pageParam, OrderInfoQueryVo orderInfoQueryVo);

    //生成订单方法
    Long submitOrder(OrderFormVo orderFormVo);

    //根据订单id获取订单信息
    OrderInfoVo getOrderInfoVoById(Long id);

    //更新订单状态：已经支付
    void updateOrderStatus(String out_trade_no);

    //查询是否购买课程
    Boolean selectStatus(Long userId, Long courseId);

    //订单列表(根据用户id
    List selectOrderInfoPageByUserId();

    //根据userId查询已购的课程列表
    List selectCourseInfoByUserId();
}

